<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AccountController
 *
 * @author hoangle
 */
class Backend_AccountController extends Zend_Controller_Action
{
    //put your code here
    public function init() {
        $this->_helper->layout->setLayout('backend');
        Service_Account::checkLogin(2);
    }

    public function index() {
        $this->_forward('get');
    }

    /**
     * @desc Get list user client
     */
    public function getAction() {
        $result = Service_Model::factory('User', 'getUserInfo', $arrParams, 'backend');
        $this->view->user = $result;
    }

    /**
     * @desc Update status User
     * @method ajax
     */
    public function updatestatusAction() {
        if ($this->_request->isPost()) {
            $arrData = $this->_request->getPost();
            if (!empty($arrData)) {
                $result = Service_Model::factory('User', 'updateStatus', $arrData, 'backend');
                if($result) {
                    echo 'true';
                }
                else {
                    echo 'false';
                }
            }
            else {
                echo 'false';
            }
        }
        exit;
    }


}
?>
